<?php
declare (strict_types = 1);

namespace app\course\service\classes;

use app\common\logic\category\Category;
use app\common\service\BaseService;
use app\course\logic\classes\Classes as ClassesLogic;
use app\course\logic\classes\ClassesLink;
use app\course\logic\base\CourseStudent;
use think\facade\Request;

/**
 * 班级课程接口类-后台
 */
class Classes extends BaseService
{

    // 获取班级课的课程目录
    public function getCourseMenu(int $id)
    {
        $data = app(ClassesLink::class)->getCourseMenu($id);

        return $this->parseToData($data, 1, '获取成功');
    }


    public function getTeacherClasses()
    {
    	$data = app(ClassesLogic::class)->getTeacherClasses('id,title,cover');

    	return $this->parseToData($data, 1, '获取成功');
    }


    public function getClassesStudents(int $id)
    {
    	$data = app(CourseStudent::class)->getCourseStudents($id);

    	return $this->parseToData($data, 1, '获取成功');
    }

    public function removeStudent(int $id, int $user_id)
    {
    	$data = app(CourseStudent::class)->removeStudent($id, $user_id);

    	return $this->parseToData($data, 1, '删除成功');
    }
}
